Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMTAT release v2.3.1 #210

Merged
merged 72 commits into from
Sep 25, 2023
Merged

CMTAT release v2.3.1 #210

merged 72 commits into from
Sep 25, 2023

Conversation

rya-sge
Copy link
Collaborator

@rya-sge rya-sge commented Jul 28, 2023

Summary

Architecture

Gas optimization

Other

  • Add ERC20 decimals as an argument of the initialize function (Add ERC20 decimals as an argument of the initialize function #213)
    Until now, the number of decimal was set inside the code to the value 0
    This release changes this behavior to use instead a parameter supplied by the deployer inside the function initialize.
  • Add a constant VERSION to indicate the current version of the token (Add contract version #229)
  • Implement an alternative to the kill function (Remove the function kill #221)
    The alternative function is the function deactivateContract inside the PauseModule, to deactivate the contract. This function set a boolean state variable isDeactivated to true and puts the contract in the pause state. The function unpause is updated to revert if the previous variable is set to true, thus the contract is in the pause state "forever".

The consequences are the following:

In standalone mode, this operation is irreversible, it is not possible to rollback.
With a proxy, it is still possible to rollback by deploying a new implementation.

Tools

  • Update the Solidity version to 0.8.20, which is a requirement for the new OpenZeppelin version (5.0.0)
  • Run tests with Hardhat instead of Truffle since Truffle does not support custom errors (Custom error with hardhat support #217)
  • Update OpenZeppelin to the version v5.0.0-rc.0

Security

Only one account holds the DEFAULT_ADMIN_ROLE since deployment until it’s potentially renounced.

Enforces a 2-step process to transfer the DEFAULT_ADMIN_ROLE to another account.

Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted.

Tasks

Initially planned, but reported to a next version or rejected

@rya-sge rya-sge self-assigned this Jul 28, 2023
rya-sge and others added 22 commits July 28, 2023 15:56
Add ERC20 decimals as an argument of the initialize function
* For loops and function arguments optimization
* Substitute require statements with custom errors
…idity version to 0.8.20, update code and test for MetaTxModule, replace _beforeTokenTransfer by _update
…est through Hardhat + update SnapshotModule test to support Hardhat and upgrade to the latest OpenZeppelin version
@rya-sge rya-sge mentioned this pull request Sep 4, 2023
@rya-sge rya-sge requested a review from veorq September 12, 2023 12:45
@rya-sge rya-sge requested a review from skrafft September 12, 2023 13:24
@rya-sge rya-sge changed the title Next CMTAT release CMTAT release 2.3.1 Sep 12, 2023
@rya-sge rya-sge changed the title CMTAT release 2.3.1 CMTAT release v2.3.1 Sep 12, 2023
@rya-sge rya-sge merged commit 0c23629 into master Sep 25, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Next release The issue has been merged into dev and will be part of the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants